<!-- Created by: Danny Thompson -->

<%@page import="java.sql.*"%>
<%@page import="com.mysql.*"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Rentflix Movie Search</title>
<link rel="stylesheet" type="text/style" href="resources/mytheme/css/normalize.css">
<link rel="stylesheet" type="text/style" href="resources/mytheme/css/browser.css">
<link rel="stylesheet" href="resources/mytheme/css/style.css">
<script type="text/javascript">
function search(url) {
	var searchstring = document.getElementById("searchBox").value;
	url = url + searchstring;
	window.location.href = url;
}
</script>
</head>

	<body>
		<div id="header">
			<div id="logo">
				<img src="resources/mytheme/img/Logo.png" alt="RentFlix">
			</div>
			<div id="searchNav">
				<form name="inputForm" method="get">
					<input class="searchBox" type="text" name="searchBox" id="searchBox" onkeypress="if (event.keyCode == 13) {search('${pageContext.request.contextPath}/searchalt?searchBox='); return false;}">
					<input class="searchButton" type="button" value="Search" onclick="search('${pageContext.request.contextPath}/searchalt?searchBox=')">
				</form>
			</div>
			<div id="navBar">
				<a href="/MovieProject">Home</a>
				<a href="/MovieProject/browse">Movies</a>
				<a href="/MovieProject/viewqueue">Queue</a>
			</div>
	
			<div id="loginBar">
				<li><div id="signoutform"><form action="signout" method="post" name="loutform"><input class="lastlink" type="submit" value="Sign Out" style="text-transform:capitalize;"></form></div></li>
				<li><a class="firstlink"href="/MovieProject/MyAccount">My Account</a></li>
			</div>
		</div>

		
		<div id="bodyContainer2">
			<h2 class="bodyTitle">Search results for: "${param.searchBox }"</h2>
			<div id="browsedMovies">
				<ul>
					<c:forEach items="${searchresults }" var="result">
						<li>
							<a href="/MovieProject/movie?searchBox=${result.title }" >
								<img src="${result.imageURL }" />
							</a>
						</li>
					</c:forEach>
				</ul>
			</div>
		</div>
		
	 <div id="footer">
	<div id="foota">
		<p>Get Help</p>
		<ul>
		  <li><a href="#">FAQ</a></li>
		  <li><a href="#">Help Center</a></li>
		  <li><a href="#">Account</a></li>
		  <li><a href="#">Questions</a></li>
		</ul>
	</div>

	<div id="footb"><p>Our Company</p>
	
		<ul>
		  <li><a href="#">About us </a></li>
		  <li><a href="#">Reviews  </a></li>
		  <li><a href="#">Jobs  </a></li>
		  <li><a href="#">Terms of Use</a></li>
		</ul>
	</div>
	
	<div id="footc"><p>Getting Started</p>
		<ul>
		  <li><a href="#">Free Trail Offer Details  </a></li>
		  <li><a href="#"> Redeem Your Gift</a></li>
		</ul>
	</div>
</div>
	</body>
</html>